import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '项目名称',
    align: "center",
    dataIndex: 'name'
  },
  {
    title: '立项日期',
    align: "center",
    dataIndex: 'approvalDate'
  },
  {
    title: '项目编号',
    align: "center",
    dataIndex: 'projectNum'
  },
  {
    title: '项目经理',
    align: "center",
    dataIndex: 'employeeCode'
  },
  {
    title: '项目文号',
    align: "center",
    dataIndex: 'approvalNum'
  },
  {
    title: '审核状态',
    align: "center",
    dataIndex: 'checkStatus_dictText'
  },
  {
    title: '审核流水',
    align: "center",
    dataIndex: 'procInstId'
  },
  {
    title: '当前状态',
    align: "center",
    dataIndex: 'status_dictText'
  },
];

//查询数据
export const searchFormSchema: FormSchema[] = [
  {
    label: "项目名称",
    field: 'name',
    component: 'Input',
    colProps: {span: 6},
  },
  {
    label: "审核状态",
    field: 'checkStatus',
    component: 'JDictSelectTag',
    componentProps:{
      dictCode: "check_status"
    },
    colProps: {span: 6},
  },
];

//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '项目名称',
    field: 'name',
    component: 'Input',
  },
  {
    label: '立项日期',
    field: 'approvalDate',
    component: 'DatePicker',
    componentProps: {
      showTime: true,
      valueFormat: 'YYYY-MM-DD HH:mm:ss'
    },
  },
  {
    label: '项目编号',
    field: 'projectNum',
    component: 'Input',
  },
  {
    label: '项目经理',
    field: 'employeeCode',
    component: 'Input',
  },
  {
    label: '项目文号',
    field: 'approvalNum',
    component: 'Input',
  },
  {
    label: '审核状态',
    field: 'checkStatus',
    component: 'JDictSelectTag',
    componentProps:{
      dictCode: "check_status"
    },
  },
  {
    label: '审核流水',
    field: 'procInstId',
    component: 'Input',
  },
  {
    label: '当前状态',
    field: 'status',
    component: 'JDictSelectTag',
    componentProps:{
      dictCode: "check_status"
    },
  },
	// TODO 主键隐藏字段，目前写死为ID
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false,
  },
];
